package com.zzyl.nursing.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zzyl.nursing.dto.NursingTaskDto;
import com.zzyl.nursing.vo.NursingTaskVo;
import com.zzyl.common.core.domain.entity.SysUser;
import com.zzyl.nursing.domain.DoTask;
import com.zzyl.nursing.domain.TaskTime;
import com.zzyl.nursing.dto.cancelDto;
import org.apache.ibatis.annotations.Mapper;
import java.util.Date;
import java.util.List;
import com.zzyl.nursing.domain.NursingTask;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 护理任务Mapper接口
 * 
 * @author alexis
 * @date 2024-11-17
 */
@Mapper
public interface NursingTaskMapper extends BaseMapper<NursingTask>
{
    /**
     * 查询护理任务
     * 
     * @param id 护理任务主键
     * @return 护理任务
     */
    public NursingTask selectNursingTaskById(Long id);

    /**
     * 查询护理任务列表
     * 
     * @param nursingTask 护理任务
     * @return 护理任务集合
     */
    public List<NursingTask> selectNursingTaskList(NursingTask nursingTask);

    /**
     * 新增护理任务
     * 
     * @param nursingTask 护理任务
     * @return 结果
     */
    public int insertNursingTask(NursingTask nursingTask);

    /**
     * 修改护理任务
     * 
     * @param nursingTask 护理任务
     * @return 结果
     */
    public int updateNursingTask(NursingTask nursingTask);

    /**
     * 删除护理任务
     * 
     * @param id 护理任务主键
     * @return 结果
     */
    public int deleteNursingTaskById(Long id);

    /**
     * 批量删除护理任务
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteNursingTaskByIds(Long[] ids);

    /**
     * 获取护理任务名称
     * @param id
     * @return
     */
    @Select("Select nick_name from sys_user where user_id = #{id}")
    List<String> getNuringName(Long id);

	/**
	 * 分页查询护理任务列表
	 * @param nursingTaskDto
	 * @return
	 */
	List<NursingTaskVo> selectNursingTaskListByDto(NursingTaskDto nursingTaskDto);



    /**
     * 更改任务时间
     * @param taskTime
     */
    void updateTime(TaskTime taskTime);



    /**
     * 查询userId
     * @param collect
     * @return
     */
     List<SysUser> selectUserId(@Param("collect") List<Long> collect);


     /**
     * 取消任务
     * @param dto
     */
    void cancel(cancelDto dto);



}
